<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateEnterprisesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('enterprises', function (Blueprint $table) {
            $table->id();
            $table->string('name', 32)->comment('公司名称');
            $table->string('code', 32)->nullable()->comment('商户号');
            $table->string('requestNo', 64)->comment('请求号');
            $table->string('licenceUrl', 200)->comment('商户证件照片地址');
            $table->string('signName', 200)->comment('商户签约名');
            $table->string('signType', 64)->comment('商户签约类型');
            $table->string('licenceNo', 128)->comment('商户证件号码');
            $table->string('shortName', 64)->comment('商户简称');
            $table->string('legalName', 64)->comment('法人名称');
            $table->string('legalLicenceType', 40)->comment('法人证件类型');
            $table->string('legalLicenceNo', 20)->comment('法人证件号码');
            $table->string('legalLicenceFrontUrl', 200)->comment('法人证件前');
            $table->string('legalLicenceBackUrl', 200)->comment('法人证件后');
            $table->string('contactName', 36)->comment('联系人');
            $table->string('contactMobile', 15)->comment('联系人手机号');
            $table->string('contactEmail', 64)->comment('联系人邮箱');
            $table->string('contactLicenceNo', 64)->comment('联系人证件号');
            $table->string('servicePhone', 15)->comment('客服电话');
            $table->string('province', 30)->comment('经营地址省');
            $table->string('city', 30)->comment('经营地址市');
            $table->string('district', 30)->comment('经营地址县');
            $table->string('address', 128)->comment('详细地址');
            $table->string('settlementDirection', 128)->comment('结算方向');
            $table->string('bankCode', 40)->comment('开户总行编码');
            $table->string('bankAccountType', 40)->comment('银行账户类型');
            $table->string('bankCardNo', 40)->comment('银行账户号码');
            $table->string('applicationStatus', 40)->nullable()->comment('审核状态');
            $table->datetime('applicationTime')->nullable()->comment('审核时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('enterprises');
    }
}
